/*
 * @LastEditors: yuSeen
 * @LastEditTime: 2021-12-18 17:40:06
 * 天凉好个秋
 */
import request from '../../request'
import type { IDefaultSearchKey, ISearchSuggest, IHotSearch } from './types'

// 默认搜索关键词
export function getDefaultSearchKey() {
    return request.get<IDefaultSearchKey>('/search/default')
}

// 搜索建议
export function getSearchSuggest(keywords: string) {
    return request.get<ISearchSuggest>('/search/suggest', {keywords})
}

// 热搜列表
export function getHotSearch() {
    return request.get<Array<IHotSearch>>('/search/hot/detail')
}